using Engine;
using Engine.Graphics;
using Game;
using GameEntitySystem;

namespace SCIENEW {
    public class FlaxNBlock : PlantNBlock {
        public int[] DropValues = [];

        public FlaxNBlock(string id, Color color, int faceTextureSlot, int[] dropValues) : base(
            id,
            IndustrialModLoader.IETexture,
            color,
            faceTextureSlot
        ) {
            DropValues = dropValues;
        }

        public override void GetDropValues(SubsystemTerrain subsystemTerrain, int oldValue, int newValue, int toolLevel, List<BlockDropValue> dropValues, out bool showDebris) {
            showDebris = true;
            if (DropValues.Length == 0) return;
            foreach (var drop in DropValues) {
                dropValues.Add(new BlockDropValue{Value = drop, Count = 1});
            }
        }

        public override NormalBlockBehavior[] GetBehaviors(Project project) => [new FlaxNBlockBehavior(project)];
    }
}